package com.maochang.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.maochang.pojo.PsInspectiontaskDetail;
import com.maochang.pojo.util.Result1;
import com.maochang.service.XunJianRenWuZhiXingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

@Slf4j
@RestController
@RequestMapping("/XunJianQueCha")
public class XunJianQueXianChaXun {
    @Resource
    private XunJianRenWuZhiXingService xunJianRenWuZhiXingService;
    /**
     * 分页加查询
     * */
    @GetMapping("/QueXianCha")
    public Result1 ChaJson(PsInspectiontaskDetail aa, String kai, String jie, String kai1, String jie1, @RequestParam("page") int current, @RequestParam("limit") int size){
        Page<PsInspectiontaskDetail> PsInList= xunJianRenWuZhiXingService.QueXianCha(aa,kai,jie,kai1,jie1,current,size);
        return Result1.success1(PsInList);
    }
    @GetMapping("/QueXianCha2")
    public Result1 ChaJson2(PsInspectiontaskDetail aa, String kai, String jie, String kai1, String jie1, @RequestParam("page") int current, @RequestParam("limit") int size, HttpSession httpSession){
        Page<PsInspectiontaskDetail> PsInList= xunJianRenWuZhiXingService.QueXianCha2(aa,kai,jie,kai1,jie1,current,size,httpSession);
        return Result1.success1(PsInList);
    }
}
